package com.example.his.api.mis.controller.form.role;


import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class SearchRoleByPageForm {
  
  @NotBlank(message = "roleName不能为空")
  @Pattern(regexp = "^[a-zA-Z0-9\\u4e00-\\u9fa5]{2,20}$", message = "roleName格式错误")
  private String roleName;
  
  @Range(min = 0, max = 1, message = "systemic格式错误")
  private Integer systemic;
  
  
  @Pattern(regexp = "^[a-zA-Z0-9\\u4e00-\\u9fa5]{2,10}$", message = "desc格式错误")
  private String desc;
  
  @NotNull(message = "page不能为空")
  @Min(value = 1, message = "page不能小于1")
  private Integer page;
  
  @NotNull(message = "length不能为空")
  @Range(min = 10, max = 100, message = "length取值范围10-100")
  private Integer length;
}
